<!--
 * new page
 * @author: denghao
 * @since: 2024-04-02
 * BottomPlayer.vue
-->
<template>
  <div>
    <div :class="['bottomPlayer', active]">
      <large-player
        @enterPlayer="enterPlayer"
        @leavePlayer="leavePlayer"
      ></large-player>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";
import LargePlayer from "./LargePlayer.vue";
/**
 * ---------变量定义---------
 */

const active = ref<string>("");
/**
 * ---------方法---------
 */

const enterPlayer = () => {
  active.value = "active";
};
const leavePlayer = () => {
  active.value = "";
};
</script>

<style lang="scss" scoped>
.bottomPlayer {
  position: fixed;
  bottom: 2px;
  left: 0;
  z-index: 5;
  width: 100%;
  height: 70px;
  opacity: 1;
  background: val(--largePlay-bg-color);
  border: 0.5px solid rgba(17, 93, 239, 0.16);
  box-shadow: 0 5px 40px -1px rgba(2, 10, 18, 0.1);
  transition: all 0.4s ease-out;
  transform: translateY(100%);
  cursor: pointer;
  &.active {
    transform: translateY(0);
  }
}
</style>
